package com.yyk.yiliao.ui.home.activity;



import android.view.View;
import android.widget.RelativeLayout;

import com.yyk.yiliao.R;
import com.yyk.yiliao.base.BaseActivity;
import com.yyk.yiliao.util.ebs.MessageEvent;

import org.greenrobot.eventbus.EventBus;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * 关系
 */
public class RelationshipM_Activity extends BaseActivity {

    @BindView(R.id.mAddmember_one)
    RelativeLayout mAddmemberOne;
    @BindView(R.id.mAddmember_two)
    RelativeLayout mAddmemberTwo;
    @BindView(R.id.mAddmember_three)
    RelativeLayout mAddmemberThree;
    @BindView(R.id.mAddmember_four)
    RelativeLayout mAddmemberFour;
    @BindView(R.id.mAddmember_five)
    RelativeLayout mAddmemberFive;
    @BindView(R.id.mAddmember_six)
    RelativeLayout mAddmemberSix;


    @Override
    public int getLayoutId() {
        return R.layout.activity_relationshipm;
    }

    @Override
    public void initView() {
        initToolbar();
    }

    private void initToolbar() {
        setBackArrow();
        setTitle("关系");
    }

    @Override
    public void initData() {

    }

    /**
     * 1.
     * 2.
     * 3.
     * 4.
     * 5.无身份证子女
     * 6.其他
     *
     * @param view
     */
    @OnClick({R.id.mAddmember_one, R.id.mAddmember_two, R.id.mAddmember_three, R.id.mAddmember_four, R.id.mAddmember_five, R.id.mAddmember_six})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.mAddmember_one:
                EventBus.getDefault().post(new MessageEvent("本人"));
                finish();
                break;
            case R.id.mAddmember_two:

                EventBus.getDefault().post(new MessageEvent("父母"));
                finish();
                break;
            case R.id.mAddmember_three:


                EventBus.getDefault().post(new MessageEvent("夫妻"));
                finish();
                break;
            case R.id.mAddmember_four:
                EventBus.getDefault().post(new MessageEvent("子女(已领取身份证)"));
                finish();
                break;
            case R.id.mAddmember_five:

                EventBus.getDefault().post(new MessageEvent("子女(未领取身份证)"));
                finish();

                break;
            case R.id.mAddmember_six:

                EventBus.getDefault().post(new MessageEvent("其他"));

                finish();
                break;
        }
    }
}
